#pragma once
#include "EnemyUnit.h"
#include "../SGD Wrappers/SGD_Listener.h"

class Turret : public EnemyUnit, public SGD::Listener
{
public:
	Turret();
	~Turret();

	virtual void Update(float dt)	 override;
//	virtual void Render()			 override;
	virtual void HandleEvent(const SGD::Event* pEvent);
	virtual void HandleCollision(const IBase* pOther) override;
	virtual void Attack() override;
	virtual int GetType(void) const override { return OBJ_TURRET; }
	void SetShutDownEvent(const char* pEvent) { ShutDownEvent = pEvent; }
	void RetrieveBehavior(std::string name);


private:

	BaseBehavior* currBehavior = nullptr;
	SGD::HAudio* turnSound = nullptr;
	SGD::HVoice voice = SGD::INVALID_HANDLE;
	std::string ShutDownEvent;
	bool isActive = true;

	friend class BaseBehavior;
};

